import React from 'react'

const MyButton = (props) => {
  return (
    <button onClick = { props.onClick }>点击</button>
  )
} 
function App() {
  const clickHandler = () => {
    console.log('点我点我')
  }
  return (
    <div>
      <MyButton onClick= { clickHandler }></MyButton>
    </div>
  )
}

export default App

